package com.liruo.apt;

import com.google.common.base.CaseFormat;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

/**
 * @Author:liruo
 * @Date:2023-10-19-20:01:14
 * @Desc
 */
public class Utils {

  private static final Gson GSON = new GsonBuilder().create();

  public static String toString(Object obj) {
    return GSON.toJson(obj);
  }

  public static String lowCamel2Up(String prefix, String name){
    return prefix + CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL, name);
  }

  public static String methodName(Class<?> clazz, String methodName){
    return clazz.getName() + "." + methodName;
  }
}
